﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace EasyCLRBase.AssemblyExplorer
{
    /// <summary>
    /// MEF mimic attribute class to use compatible structur for CLR creation. Since MEF do not support attribute for struct, this class become standalone.
    /// </summary>
    [AttributeUsageAttribute(AttributeTargets.Class | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Struct, AllowMultiple = true, Inherited = false)]
    public class ExportAttribute : Attribute
    {
        /// <summary>
        /// Imitation of the Contract Type of the MEF
        /// </summary>
        public Type ContractType { get; private set; }
        /// <summary>
        /// Initialize Attribute.
        /// </summary>
        /// <param name="contractType">Type to export.</param>
        public ExportAttribute(Type contractType)
        {
            this.ContractType = contractType;
        }
    }
}
